package service

type ResponseBody[T any] struct {
	Code    int    `json:"code"`
	Data    T      `json:"data"`
	Message string `json:"message"`
}

type ResponseBodyStock[T any] struct {
	Code    int    `json:"code"`
	Result  T      `json:"result"`
	Message string `json:"message"`
	Status  string `json:"status"`
}

type RequestBody[T any] struct {
	Token  string `json:"token"`
	Params T      `json:"params"`
}

type ChartData struct {
	Labels []string `json:"labels"`
	Datas  []int32  `json:"datas"`
}
type NearlyHalfLabel struct {
	Date     string
	Allcount int32
}

type AnnualComparisonResponseBody[T any] struct {
	Code     int32  `json:"code"`
	Text     string `json:"text"`
	RewsList T      `json:"rewsList"`
}
type AnnualComparisonParams struct {
	Date           string `json:"date"`
	ThisYear       int32  `json:"thisYear"`
	Month          string `json:"month"`
	LastYear       int32  `json:"lastYear"`
	BeforeLastYear int32  `json:"beforeLastYear"`
}

type ResponseStatue struct {
	Code int32  `json:"code"`
	Text string `json:"text"`
}
type ResponsePack[T any] struct {
	Custom T              `json:"custom"`
	Status ResponseStatue `json:"status"`
}

type PositionAndDateResponse struct {
	Code  int32                  `json:"code"`
	Text  string                 `json:"text"`
	Array []PositionAndDateArray `json:"array"`
}

type PositionAndDateArray struct {
	Unit  string `json:"unit"`
	Name  string `json:"name"`
	Value int32  `json:"value"`
	Ratio string `json:"ratio"`
}

type OneMachineCountryResponse struct {
	AreaCount     int32                   `json:"areaCount"`
	ProvinceCount int32                   `json:"provinceCount"`
	List          []OneMachineCountryList `json:"list"`
}
type OneMachineCountryList struct {
	Code  string `json:"code"`
	Name  string `json:"name"`
	Value int32  `json:"value"`
}

type CreateTokenParams struct {
	Appkey     string `json:"appkey"`
	Appsecret  string `json:"appsecret"`
	Macaddress string `json:"macaddress"`
}

type CreateTokenResponse struct {
	Code  int32  `json:"code"`
	Text  string `json:"text"`
	Token string `json:"token"`
}

type DataListResponse[T any] struct {
	Code      int32  `json:"code"`
	DataList  []T    `json:"datalist"`
	Text      string `json:"text"`
	Datacount int32  `json:"datacount"`
}

type NearlyBjlList struct {
	ProjectCount string `json:"projectcount"`
	Year         string `json:"year"`
	CenterName   string `json:"centername"`
}

type TaskNum struct {
	Code       int32  `json:"code"`
	PromiseNum int32  `json:"promise_num"`
	TotalNum   int32  `json:"total_num"`
	PromptNum  int32  `json:"prompt_num"`
	Text       string `json:"text"`
}

type TaskByShenpilbRequest struct {
	Shenpilb string `json:"shenpilb"`
}
type CangoRegionRequest struct {
	Code  string `json:"code"`
	Level int32  `json:"level"`
}
type CangoRegionListRequest struct {
	Token  string                       `json:"token"`
	Params CangoRegionListRequestParams `json:"params"`
}
type CangoRegionListRequestParams struct {
	Code      string `json:"code"`
	Level     int32  `json:"level"`
	Appkey    string `json:"appkey"`
	Appsecret string `json:"appsecret"`
	Sign      string `json:"sign"`
}
type CangoRegionListResponse struct {
	Code       int32                         `json:"code"`
	Regionlist []CangoRegionListResponseItem `json:"regionlist"`
	Text       string                        `json:"text"`
}

type CangoRegionListResponseItem struct {
	Code string `json:"code"`
	Name string `json:"name"`
}

type TaskByShenpilbResponse struct {
	Code      int32                `json:"code"`
	DataList  []TaskByShenpilbList `json:"datalist"`
	Datacount int32                `json:"datacount"`
	Text      string               `json:"text"`
}

type TaskList struct {
	Code     int32      `json:"code"`
	TaskList []TaskItem `json:"tasklist"`
	Text     string     `json:"text"`
}

type TaskItem struct {
	Shenpilb string `json:"shenpilb"`
	Percent  string `json:"percent"`
}
type TaskByShenpilbList struct {
	Num     int32  `json:"num"`     // 部门审批类别事项数量
	Percent string `json:"percent"` // 占比
	Ouname  string `json:"ouname"`  // 部门名称
}

type CountryQhInfo struct {
	ZwfwCenterCount int32           `json:"zwfwCenterCount"`
	TodayCount      int32           `json:"todayCount"`
	List            []CountryQhList `json:"list"`
	BmCenterCount   int32           `json:"bmCenterCount"`
}

type CountryQhList struct {
	Code      string  `json:"code"`
	Prop      float32 `json:"prop"`
	Name      string  `json:"name"`
	Value     int32   `json:"value"`
	Szrurl    string  `json:"szrurl"`
	Longitude string  `json:"longitude"`
	Latitude  string  `json:"latitude"`
}

type CenterTaskTypeQhCount struct {
	List []CenterTaskTypeQhList `json:"list"`
}

type CenterTaskTypeQhList struct {
	TaskTypeName string `json:"tasktypename"`
	Code         string `json:"code"`
	Name         string `json:"name"`
	Value        int32  `json:"value"`
}

// 获取乡镇的当日取号信息
type CountLegalPersonData struct {
	CodeType         string `json:"codeType"`
	EstablishDate    string `json:"establishDate"`
	TotalRegCapital  string `json:"totalRegCapital"`
	TotalLegalPerson string `json:"totalLegalPerson"`
}

type TokenParams[T any] struct {
	Token  string `json:"token"`
	Params T      `json:"params"`
}

type HotTop5Detail struct {
	Taskguid string `json:"taskguid"`
	First    int32  `json:"first"`
	PageSize int32  `json:"pageSize"`
}

type HotTop5Item struct {
	Name     string `json:"name"`
	Taskguid string `json:"taskguid"`
	Value    int32  `json:"value"`
}

type HotTop5DetailItem struct {
	Itemname   string `json:"itemname"`
	Createdate string `json:"createdate"`
}

type HotTaskTop5DetailItem struct {
	Creditcode string `json:"creditcode"`
	Grade      string `json:"grade"`
	Legal      string `json:"legal"`
	Agencyname string `json:"agencyname"`
}

type AllInOnePC struct {
	Params AllInOnePCType `json:"params"`
}

type AllInOnePCType struct {
	Type string `json:"type"`
}

type TaskAndCountResponse struct {
	Code       int32                      `json:"code"`
	LevelArray []TaskAndCountResponseList `json:"levelarray"`
	AllCount   int32                      `json:"allcount"`
	Text       string                     `json:"text"`
}
type TaskAndCountResponseList struct {
	ModuleName string                  `json:"ModuleName"`
	LevelTwo   *[]TaskAndCountLevelTwo `json:"leveltwo"`
}

type TaskAndCountLevelTwo struct {
	ModuleName string                    `json:"ModuleName"`
	LevelThree *[]TaskAndCountLevelThree `json:"levelthree"`
}
type TaskAndCountLevelThree map[string]int

type ParamsRequest[T any] struct {
	Params T `json:"params"`
}

type TimeRange struct {
	StartDate string `json:"startDate"`
	EndDate   string `json:"endDate"`
}

type RequestParams[T any] struct {
	Params T `json:"params"`
}

type YtjCountParamsItem struct {
	Order string  `json:"order"`
	Type  *string `json:"type"`
}

type YtjCountResponseItem struct {
	SumCount        int32  `json:"sumcount"`
	CenterGuid      string `json:"centerguid"`
	MachineNo       string `json:"machineno"`
	MachineName     string `json:"machinename"`
	MacAddress      string `json:"macaddress"`
	DetailedAddress string `json:"detailedaddress"`
}

type YtjCountResponse struct {
	Code    int32                  `json:"code"`
	Text    string                 `json:"text"`
	Ytjlist []YtjCountResponseItem `json:"ytjlist"`
}

type YtjArrayResponse struct {
	Code     int32                  `json:"code"`
	Text     string                 `json:"text"`
	Ytjarray []YtjArrayResponseItem `json:"ytjarray"`
}
type YtjArrayResponseItem struct {
	Ytjlist  []YtjCountResponseItem `json:"ytjlist"`
	Townname string                 `json:"townname"`
}

type CenterTaskTypeQhCountByAreaParams struct {
	AreaCode string `json:"areacode"`
}

type CenterTaskTypeQhCountByAreaResponse struct {
	List []CenterTaskTypeQhCountByAreaResponseItem `json:"list"`
}

type CenterTaskTypeQhCountByAreaResponseItem struct {
	Value             int32  `json:"value"`
	Largetasktypename string `json:"largetasktypename"`
	Tasktypename      string `json:"tasktypename"`
}

type ZqInfoParams[T any] struct {
	Token  string `json:"token"`
	Params T      `json:"params"`
}

type ZqInfoListParamsItem struct {
	Centerguid string `json:"centerguid"`
}

type ZqInfoListResponse struct {
	Code  int32                    `json:"code"`
	Text  string                   `json:"text"`
	Slide []ZqInfoListResponseItem `json:"slide"`
}

type ZqInfoListResponseItem struct {
	Windowlist []ZqInfoListResponseItemList `json:"windowlist"`
}
type ZqInfoListResponseItemList struct {
	Zqrowguid         string `json:"zqrowguid"`
	Waitnum           string `json:"waitnum"`
	Largetasktypename string `json:"largetasktypename"`
}

type ZqListParamsItem struct {
	Zqrowguid string `json:"zqrowguid"`
	Pageindex int32  `json:"pageindex"`
	Pagesize  int32  `json:"pagesize"`
}

type ZqListResponse struct {
	Total     int32                `json:"total"`
	Code      int32                `json:"code"`
	Text      string               `json:"text"`
	Zqname    string               `json:"zqname"`
	Tasklist  []ZqListResponseItem `json:"tasklist"`
	Totalwait int32                `json:"totalwait"`
}

type ZqListResponseItem struct {
	Taskrowguid  string `json:"taskrowguid"`
	Tasktypename string `json:"tasktypename"`
	Waitnum      string `json:"waitnum"`
}
